hbridge18 2.2.1
Loading...
Searching...
No Matches
H-Bridge 18 Registers Settings

Settings for registers of H-Bridge 18 Click driver. More...

Macros

#define HBRIDGE18_IC_STAT_OTSD   0x40
 H-Bridge 18 IC_STAT register setting.
#define HBRIDGE18_IC_STAT_OTW   0x20
#define HBRIDGE18_IC_STAT_OLD   0x10
#define HBRIDGE18_IC_STAT_OCP   0x08
#define HBRIDGE18_IC_STAT_UVLO   0x04
#define HBRIDGE18_IC_STAT_OVP   0x02
#define HBRIDGE18_IC_STAT_NPOR   0x01
#define HBRIDGE18_CONFIG_CTRL_POLD_EN   0x80
 H-Bridge 18 CONFIG_CTRL register setting.
#define HBRIDGE18_CONFIG_CTRL_IC_ID_DRV8904   0x40
#define HBRIDGE18_CONFIG_CTRL_IC_ID_MASK   0x70
#define HBRIDGE18_CONFIG_CTRL_OCP_REP   0x08
#define HBRIDGE18_CONFIG_CTRL_OTW_REP   0x04
#define HBRIDGE18_CONFIG_CTRL_EXT_OVP   0x02
#define HBRIDGE18_CONFIG_CTRL_CLR_FLT   0x01
#define HBRIDGE18_OP_CTRL_1_HB4_HS_EN   0x80
 H-Bridge 18 OP_CTRL_1 register setting.
#define HBRIDGE18_OP_CTRL_1_HB4_LS_EN   0x40
#define HBRIDGE18_OP_CTRL_1_HB3_HS_EN   0x20
#define HBRIDGE18_OP_CTRL_1_HB3_LS_EN   0x10
#define HBRIDGE18_OP_CTRL_1_HB2_HS_EN   0x08
#define HBRIDGE18_OP_CTRL_1_HB2_LS_EN   0x04
#define HBRIDGE18_OP_CTRL_1_HB1_HS_EN   0x02
#define HBRIDGE18_OP_CTRL_1_HB1_LS_EN   0x01
#define HBRIDGE18_OP_CTRL_1_HB34_MASK   0xF0
#define HBRIDGE18_OP_CTRL_1_HB12_MASK   0x0F
#define HBRIDGE18_OLD_CTRL_1_HB4_OLD_DIS   0x08
 H-Bridge 18 OLD_CTRL_1 register setting.
#define HBRIDGE18_OLD_CTRL_1_HB3_OLD_DIS   0x04
#define HBRIDGE18_OLD_CTRL_1_HB2_OLD_DIS   0x02
#define HBRIDGE18_OLD_CTRL_1_HB1_OLD_DIS   0x01
#define HBRIDGE18_MOTOR_0   0
 H-Bridge 18 motor selection setting.
#define HBRIDGE18_MOTOR_1   1
#define HBRIDGE18_MOTOR_STATE_COAST   0
 H-Bridge 18 motor state setting.
#define HBRIDGE18_MOTOR_STATE_FORWARD   1
#define HBRIDGE18_MOTOR_STATE_REVERSE   2
#define HBRIDGE18_MOTOR_STATE_BRAKE_LS   3
#define HBRIDGE18_MOTOR_STATE_BRAKE_HS   4
#define HBRIDGE18_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
#define HBRIDGE18_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE

Detailed Description

Settings for registers of H-Bridge 18 Click driver.

Macro Definition Documentation

◆ HBRIDGE18_CONFIG_CTRL_CLR_FLT

#define HBRIDGE18_CONFIG_CTRL_CLR_FLT   0x01

◆ HBRIDGE18_CONFIG_CTRL_EXT_OVP

#define HBRIDGE18_CONFIG_CTRL_EXT_OVP   0x02

◆ HBRIDGE18_CONFIG_CTRL_IC_ID_DRV8904

#define HBRIDGE18_CONFIG_CTRL_IC_ID_DRV8904   0x40

◆ HBRIDGE18_CONFIG_CTRL_IC_ID_MASK

#define HBRIDGE18_CONFIG_CTRL_IC_ID_MASK   0x70

◆ HBRIDGE18_CONFIG_CTRL_OCP_REP

#define HBRIDGE18_CONFIG_CTRL_OCP_REP   0x08

◆ HBRIDGE18_CONFIG_CTRL_OTW_REP

#define HBRIDGE18_CONFIG_CTRL_OTW_REP   0x04

◆ HBRIDGE18_CONFIG_CTRL_POLD_EN

#define HBRIDGE18_CONFIG_CTRL_POLD_EN   0x80

H-Bridge 18 CONFIG_CTRL register setting.

Specified setting for CONFIG_CTRL register of H-Bridge 18 Click driver.

◆ HBRIDGE18_IC_STAT_NPOR

#define HBRIDGE18_IC_STAT_NPOR   0x01

◆ HBRIDGE18_IC_STAT_OCP

#define HBRIDGE18_IC_STAT_OCP   0x08

◆ HBRIDGE18_IC_STAT_OLD

#define HBRIDGE18_IC_STAT_OLD   0x10

◆ HBRIDGE18_IC_STAT_OTSD

#define HBRIDGE18_IC_STAT_OTSD   0x40

H-Bridge 18 IC_STAT register setting.

Specified setting for IC_STAT register of H-Bridge 18 Click driver.

◆ HBRIDGE18_IC_STAT_OTW

#define HBRIDGE18_IC_STAT_OTW   0x20

◆ HBRIDGE18_IC_STAT_OVP

#define HBRIDGE18_IC_STAT_OVP   0x02

◆ HBRIDGE18_IC_STAT_UVLO

#define HBRIDGE18_IC_STAT_UVLO   0x04

◆ HBRIDGE18_MOTOR_0

#define HBRIDGE18_MOTOR_0   0

H-Bridge 18 motor selection setting.

Specified setting for motor selection of H-Bridge 18 Click driver.

◆ HBRIDGE18_MOTOR_1

#define HBRIDGE18_MOTOR_1   1

◆ HBRIDGE18_MOTOR_STATE_BRAKE_HS

#define HBRIDGE18_MOTOR_STATE_BRAKE_HS   4

◆ HBRIDGE18_MOTOR_STATE_BRAKE_LS

#define HBRIDGE18_MOTOR_STATE_BRAKE_LS   3

◆ HBRIDGE18_MOTOR_STATE_COAST

#define HBRIDGE18_MOTOR_STATE_COAST   0

H-Bridge 18 motor state setting.

Specified setting for motor state of H-Bridge 18 Click driver.

◆ HBRIDGE18_MOTOR_STATE_FORWARD

#define HBRIDGE18_MOTOR_STATE_FORWARD   1

◆ HBRIDGE18_MOTOR_STATE_REVERSE

#define HBRIDGE18_MOTOR_STATE_REVERSE   2

◆ HBRIDGE18_OLD_CTRL_1_HB1_OLD_DIS

#define HBRIDGE18_OLD_CTRL_1_HB1_OLD_DIS   0x01

◆ HBRIDGE18_OLD_CTRL_1_HB2_OLD_DIS

#define HBRIDGE18_OLD_CTRL_1_HB2_OLD_DIS   0x02

◆ HBRIDGE18_OLD_CTRL_1_HB3_OLD_DIS

#define HBRIDGE18_OLD_CTRL_1_HB3_OLD_DIS   0x04

◆ HBRIDGE18_OLD_CTRL_1_HB4_OLD_DIS

#define HBRIDGE18_OLD_CTRL_1_HB4_OLD_DIS   0x08

H-Bridge 18 OLD_CTRL_1 register setting.

Specified setting for OLD_CTRL_1 register of H-Bridge 18 Click driver.

◆ HBRIDGE18_OP_CTRL_1_HB12_MASK

#define HBRIDGE18_OP_CTRL_1_HB12_MASK   0x0F

◆ HBRIDGE18_OP_CTRL_1_HB1_HS_EN

#define HBRIDGE18_OP_CTRL_1_HB1_HS_EN   0x02

◆ HBRIDGE18_OP_CTRL_1_HB1_LS_EN

#define HBRIDGE18_OP_CTRL_1_HB1_LS_EN   0x01

◆ HBRIDGE18_OP_CTRL_1_HB2_HS_EN

#define HBRIDGE18_OP_CTRL_1_HB2_HS_EN   0x08

◆ HBRIDGE18_OP_CTRL_1_HB2_LS_EN

#define HBRIDGE18_OP_CTRL_1_HB2_LS_EN   0x04

◆ HBRIDGE18_OP_CTRL_1_HB34_MASK

#define HBRIDGE18_OP_CTRL_1_HB34_MASK   0xF0

◆ HBRIDGE18_OP_CTRL_1_HB3_HS_EN

#define HBRIDGE18_OP_CTRL_1_HB3_HS_EN   0x20

◆ HBRIDGE18_OP_CTRL_1_HB3_LS_EN

#define HBRIDGE18_OP_CTRL_1_HB3_LS_EN   0x10

◆ HBRIDGE18_OP_CTRL_1_HB4_HS_EN

#define HBRIDGE18_OP_CTRL_1_HB4_HS_EN   0x80

H-Bridge 18 OP_CTRL_1 register setting.

Specified setting for OP_CTRL_1 register of H-Bridge 18 Click driver.

◆ HBRIDGE18_OP_CTRL_1_HB4_LS_EN

#define HBRIDGE18_OP_CTRL_1_HB4_LS_EN   0x40

◆ HBRIDGE18_SET_DATA_SAMPLE_EDGE

#define HBRIDGE18_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE

Data sample selection.

This macro sets data samples for SPI modules.

Note
Available only on Microchip PIC family devices. This macro will set data sampling for all SPI modules on MCU. Can be overwritten with hbridge18_init which will set SET_SPI_DATA_SAMPLE_MIDDLE by default on the mapped mikrobus.

◆ HBRIDGE18_SET_DATA_SAMPLE_MIDDLE

#define HBRIDGE18_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE